package com.zrrd.learn.chapter08面向对象.car;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * 汽车1
 *
 * @author wrn
 * @version 1.0
 * @date 2023/7/27 14:17
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString(callSuper = true)
public class Dcar extends car{

    private boolean dian;

    public Dcar(String color,String pinpai,String xinghao,boolean dian){
        super(color,pinpai,xinghao);
        this.dian = dian;
    }

    @Override
    public void show() {
        System.out.println("我是颜色为" + getColor()+ ",品牌为" + getPinpai() + ",型号为" + getXinghao() + "的汽车,"+dian);
    }

    @Override
    public void run() {
        System.out.println("用电跑");
    }


}
